package com.example.tse.rbhttpservice.service.goods.model;

import java.util.List;
import java.util.ArrayList;
import com.example.tse.rbhttpservice.service.RudderResponse;


//import com.rbyair.services.goods.model.GoodsGetCategoryList;
/**
 * 获取分类列表
 * @author wliu
 * edit tse
 */
public class GoodsGetCategoryListResponse extends RudderResponse{
    
    private List<GoodsGetCategoryList> getCategoryList = new ArrayList<GoodsGetCategoryList>();
		
	
    /**
     * @return getCategoryList
     */	
    public List<GoodsGetCategoryList> getGetCategoryList() { 
	    return this.getCategoryList;
    };
	
	/**
     * @return getCategoryList
     */	
    public void setGetCategoryList(List<GoodsGetCategoryList> getCategoryList) { 
        this.getCategoryList = getCategoryList;
    };
    
	
        
    private static void filterFor(GoodsGetCategoryListChilds goods) {
        if (goods.getCatId() == null) {
            goods.setCatId("");
        }
        if (goods.getCatSubImg() == null) {
            goods.setCatSubImg("");
        }
        if (goods.getCatName() == null) {
            goods.setCatName("");
        }
    }
        
    private static void filterFor(GoodsGetCategoryList goods) {
        if (goods.getCatId() == null) {
            goods.setCatId("");
        }
        if (goods.getCatName() == null) {
            goods.setCatName("");
        }
        if (goods.getCatImg() == null) {
            goods.setCatImg("");
        }
        if (goods.getChilds() == null) {
            goods.setChilds(new ArrayList<GoodsGetCategoryListChilds>());
        } else {
            for (GoodsGetCategoryListChilds item : goods.getChilds()) {
                filterFor(item);
            }
        }
        if (goods.getLinkType() == null) {
            goods.setLinkType("");
        }
        if (goods.getTarget() == null) {
            goods.setTarget("");
        }
    }
        
    public static void filter(GoodsGetCategoryListResponse goods) {
        if (goods.getGetCategoryList() == null) {
            goods.setGetCategoryList(new ArrayList<GoodsGetCategoryList>());
        } else {
            for (GoodsGetCategoryList item : goods.getGetCategoryList()) {
                filterFor(item);
            }
        }
    }
}
